// const runtimeEnv = process.env.NODE_ENV
const buildEnv = process.env.VUE_APP_BUILD
const ifMock = process.env.VUE_APP_MOCK === 'enable'

const serverURL = new Map([
  ['development', 'http://127.0.0.1:8198'],
  ['testbuild', 'http://127.0.0.1:8198'],
  ['production', 'https://guangapi.qixincha.com'],
])

export const SERVER_API = ifMock ? '/__mock__' : serverURL.get(buildEnv)

export const AUTH_TOKEN = 'gfrestToken'
export const USER_INFO = 'gfrestUserinfo'

// upload
export const UPLOAD_URL = `${serverURL.get(buildEnv)}/misc/encrypt_file/`
export const NOREMAL_UPLOAD_URL = `${serverURL.get(buildEnv)}/misc/file/`
